//
//  GSStrategyDetailCell.m
//  GameSky
//
//  Created by lanou on 16/1/10.
//  Copyright © 2016年 NiRongfei. All rights reserved.
//

#import "GSStrategyDetailCell.h"

#define kMargin 10

@implementation GSStrategyDetailCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        // 夜间模式
        self.dk_backgroundColorPicker = DKColorWithRGB(0xffffff, 0x343434);
        
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kMargin, kMargin, kScreenWidth - kMargin * 2, 40)];
        self.titleLabel.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor grayColor]);
        self.titleLabel.font = [UIFont systemFontOfSize:15];
        self.titleLabel.numberOfLines = 0;
        [self.contentView addSubview:self.titleLabel];
        
        self.commentLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth - kMargin - 100, 70, 100, 20)];
        self.commentLabel.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor grayColor]);
        self.commentLabel.font = [UIFont systemFontOfSize:12];
        self.commentLabel.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:self.commentLabel];
    }
    return self;
}

- (void)setModel:(GSNewsListModel *)model
{
    _model = model;
    self.titleLabel.text = model.title;
    self.commentLabel.text = [NSString stringWithFormat:@"%@人评论",model.commentsCount];
}

+ (void)cellHeightForModel:(GSNewsListModel *)model
{
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
